Is There an Error in My Custom Stack Class Implementation in Python